# Makefile for the socket programming example
#

simple_server_objects = ServerSocket.o Socket.o customer_handle.o MyDB.o vector_serialization.o
simple_client_objects = ClientSocket.o Socket.o simple_client_main.o vector_serialization.o


all : simple_server simple_client

simple_server: $(simple_server_objects)
	g++ -o simple_server $(simple_server_objects) -lpthread -lmysqlclient -lboost_serialization


simple_client: $(simple_client_objects)
	g++ -o simple_client $(simple_client_objects) -lboost_serialization


customer_handle.o:customer_handle.cpp
	g++ -c -std=gnu++11 customer_handle.cpp
MyDB.o:c++_mysql/MyDB.cc
	g++ -c c++_mysql/MyDB.cc

vector_serialization.o:vector_serialization.cc
	g++ -c vector_serialization.cc

#Socket: Socket.cpp
#ServerSocket: ServerSocket.cpp
#ClientSocket: ClientSocket.cpp
#simple_server_main: simple_server_main.cpp
#simple_client_main: simple_client_main.cpp


clean:
	rm -f *.o simple_server simple_client
